/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 刘远望
 * Date: 2025-03-25
 * Time: 19:14
 */
public class Test {
    public static void main(String[] args) {
        Integer a = 127;
        Integer b = 127;
        System.out.println( a == b);

        Integer c = 128;
        Integer d = 128;
        System.out.println( c == d);
    }
    //拆箱
    public static void main2(String[] args) {
        Integer a = 10;
        int b = a;//自动拆箱

        int c = a.intValue();

        double d = a.doubleValue();
        System.out.println(c);
        System.out.println(d);
    }
    //装箱
    public static void main1(String[] args) {
        int a = 10;
        Integer i = Integer.valueOf(a);//显示装箱
        Integer i2 = 20;//自动装箱

        Double i3 = Double.valueOf(a);
        System.out.println(i);
        System.out.println(i2);
        System.out.println(i3);
    }
}
